import QtQuick 2.12
import "../components"


Item {
    id: root
    anchors.fill: parent
    anchors.topMargin: 20*dp
    anchors.bottomMargin: 20*dp

//    objectName: "PCRTable_" + chartname

//    Connections{
//        target: CAnalysis
//        onTableChanged: {
//            refresh()
//        }
//    }

    function refresh(){
        sampleTable.setData(CAnalysis.getSampleTable())
        if(curPage === 0){
            sampleTable.setVisibleNum(4)
        }else if(curPage === 1){
            sampleTable.setVisibleNum(5)
        }else if(curPage === 2){
            sampleTable.setVisibleNum(7)
        }
    }

    SampleTable{
        id: sampleTable
        visible: true
    }
    Component.onCompleted: {
        var data = []
        for(let i = 0; i < 30; i ++){
            data.push([i, i, i, i, i, i, i])
        }
        sampleTable.setData(data)
    }
}
